/**
* Created by QiYuBu on 2016/11/26.
* @ Description:[头部]
*/
<template>
  <div class="headNav fix">
    <!--<div class="img" @click="goback">-->
      <!--&lt;!&ndash;<i class="iconfont icon-llmainpageback"></i>&ndash;&gt;-->
    <!--</div>-->
    <div class="centerTitle" v-text="centerTitle">

    </div>
    <div class="rightTitle" v-text="rightTitle" @click="rightClick">

    </div>
  </div>
</template>
<style lang="scss" rel="stylesheet/scss" scoped>
  .img{
    width: 1.7rem;
    height: 2.2rem;
    line-height: 2.2rem;
    text-align: left;
    background: url('../assets/images/back.png') no-repeat left center;
    background-size: .6rem 1.1rem;
  }

  .headNav {
    z-index: 1;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    background: #46a1bb;
    background-size: cover;
    height: 2.2rem;
    padding: 0 .75rem;

    >.img{
      height: 2.2rem;
      width: 1.75rem;
      position: absolute;
    }
    >.centerTitle{
      color: white;
      font-size: .9rem;
      width: 100%;
      text-align: center;
      line-height: 2.2rem;
      position: relative;
      float: left;
    }
    >.rightTitle{
      font-size: .8rem;
      width: 1.75rem;
      text-align: right;
      line-height: 2.2rem;
      color: white;
      position: absolute;
      right: .75rem;
    }
  }
</style>
<script>

  export default{
    props: ['centerTitle', 'rightTitle'],
//    props: {
//      centerTitle:'',
//
//    },
    data(){
      return {
//        centerTitleH: 'hello vue',
//        rightTitle: '管理'
      }
    },
    methods: {
      goback(){
        this.$router.push({
          name: this.$store.state.headNav.back,
          params:{
            parameter:this.$store.state.headNav.mainIndexparameter,
          }
        });
      },
      rightClick(){
        this.$emit('rightClick');
      }
    }

  }
</script>
